{% extends "layout.html" %}
{% block title %}Add issue{% endblock %}
{% block body %}
  <h2>Add issue</h2>
  {% if error %}<div class=error><strong>Error:</strong> {{ error }}</div>{% endif %}
  <form action="" method=post>
    <dl>
      <dt>State</dt>
      <dd>
      <select name="state">
      {% for state in states %}
        {% if state.selected == 1 %}
            <option value="{{ state.id }}"  selected="selected">{{ state.title }}</option>
        {% else %}
            <option value="{{ state.id }}">{{ state.title }}</option>
        {% endif %}
      {% endfor %}
      </select>
      </dd>
      <dt>Title:
      <dd><input type=text name=title size=30 value="">
      <dt>Description:
      <dd><input type=text name=description size=30>
    </dl>
    <div class=actions><input type=submit value="Add issue"></div>
  </form>
{% endblock %}